#coding: utf-8
'''
测试正则表达式的
'''

import re

def test1():
    str = """<a href="http://q.10jqka.com.cn/stock/gn/zndw/">智能电网</a>"""
    print(str)
    matched =  re.search(r'href="http://q.10jqka.com.cn/stock/gn/(.*)/">(.*)<', str)
    print(matched.group())
    print(matched.group(1))
    print(matched.group(2))


if __name__ == '__main__':
    test1()